package com.myapp.ruyixing.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;

import com.myapp.ruyixing.R;
import com.myapp.ruyixing.ui.widget.TitleBar;

public class MineActivity extends Activity implements OnClickListener {

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.activity_mine);

		((TitleBar) findViewById(R.id.title_bar))
				.setOnIconClickedListener(new OnClickListener() {

					@Override
					public void onClick(View v) {
						onBackPressed();
					}
				});

		findViewById(R.id.text_dingdan).setOnClickListener(this);
		findViewById(R.id.text_shoucang).setOnClickListener(this);
		findViewById(R.id.text_jifen).setOnClickListener(this);
		findViewById(R.id.text_liuyan).setOnClickListener(this);
		findViewById(R.id.text_guanzhu).setOnClickListener(this);
		findViewById(R.id.text_fensi).setOnClickListener(this);
		findViewById(R.id.layout_qiandao).setOnClickListener(this);
		findViewById(R.id.layout_dianping).setOnClickListener(this);
		findViewById(R.id.layout_zhaopian).setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		Intent intent;
		switch (v.getId()) {
		case R.id.text_dingdan:
			intent = new Intent(this, OrderActivity.class);
			startActivity(intent);
			break;
		case R.id.text_shoucang:
			intent = new Intent(this, FavoriteActivity.class);
			startActivity(intent);
			break;
		case R.id.text_jifen:
			intent = new Intent(this, ScoreActivity.class);
			startActivity(intent);
			break;
		case R.id.text_liuyan:
			break;
		case R.id.text_guanzhu:
			intent = new Intent(this, FollowActivity.class);
			startActivity(intent);
			break;
		case R.id.text_fensi:
			intent = new Intent(this, FansActivity.class);
			startActivity(intent);
			break;
		case R.id.layout_qiandao:
			intent = new Intent(this, RegistrationActivity.class);
			startActivity(intent);
			break;
		case R.id.layout_dianping:
			intent = new Intent(this, RemarkActivity.class);
			startActivity(intent);
			break;
		case R.id.layout_zhaopian:
			intent = new Intent(this, PhotoActivity.class);
			startActivity(intent);
			break;
		default:
			break;
		}
	}
}
